import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
      isLogin: false,
      userInfo: {
          userName: "",
          password: "",
          userRealName: "",
          idCard: "",
          wechatCode: "",
          phoneNum: "",
          mailAddr: "",
          schoolName: "",
          studentNum: ""
      }
  },
  mutations: {
      //更新用户信息
      updateUserInfo(state, newUserInfo) {
          state.userInfo = newUserInfo;
      },
      updateIsLogin(state, isLogin){
          state.isLogin = isLogin;
      }
  },
  actions: {
  },
  modules: {
  }
})
